Skip to content

bundle xlr manifest - #13

Merged
cehan-Chloe merged 4 commits into
mainfrom
xlr-bundle
Sep 25, 2026
Merged

cehan-Chloe merged 4 commits into
mainfrom
xlr-bundle

Conversation

@cehan-Chloe

@cehan-Chloe cehan-Chloe commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds player xlr bundle — a new command that bundles several already-compiled packages' Assets/Views capabilities into one manifest, keyed by type name (e.g. input) instead of by source package. This lets a consumer look up "what package implements input" before installing anything — the per-package manifest xlr compile already produces can't answer that, since reading it requires having installed the package already.

Enhanced xlr compile with metadata for collision with same type. lets a topic tell colliding entries apart, mirroring the shape a @player-ui/partial-match-registry discriminator uses at runtime (e.g. { kind: "card" }).

Scope: Assets/Views only.
other player capabilities like DataTypes/Formatters/Validators/Expressions ship are excluded.

Collision behavior: when two sources produce the same type name, bundle keeps both entries rather than picking a winner — that choice belongs to whichever topic hits the collision, in its own config.

Config additions:

bundleSources: Array — packages/directories to collate; falls back from -s flags (flags win, matching this repo's documented config-vs-flag precedence).
bundleMetaData: Record<string, Record<string, unknown>> — keyed by the exact --source value.
Also included on this branch: the xlr compile package-identity work (config.xlr.platformPackages, Bazel env-var-driven react/ios/android stamping in packages.ts) that bundle depends on to produce a complete packages block per entry.

Companion Bazel-side change: a matching xlr_bundle macro has been added in rules_player (player-ui/rules_player#122 ) — Bazel builds supply sources as an explicit, ordered list of target labels rather than a config file.
Companion xlr interface change: player-ui/xlr#14

Test result:

  1. bazel
{
    "capabilities": {
        "input": [
            {
                "react": {
                    "name": "@player-ui/reference-assets-plugin-react",
                    "version": "1.2.0-next.7"
                },
                "ios": {
                    "name": "PlayerUIReferenceAssets",
                    "version": "1.2.0-next.7"
                },
                "android": {
                    "name": "com.intuit.playerui.plugins:reference-assets",
                    "version": "1.2.0-next.7"
                },
                "metaData": {
                    "kind": "reference"
                }
            }
        ],

}
  1. non-bazel
{
    "capabilities": {
        "action": [
            {
                "react": {
                    "name": "@web-player-plugin",
                    "version": "5.8.43"
                },
                "ios": {
                    "name": "PlayerUIPlugin",
                    "version": "5.4.23"
                },
                "android": {
                    "name": "PlayerPlugin",
                    "version": "4.5.23"
                },
               {
                "metaData": {
                    "kind": "cg"
                }
            }
        ]
}

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.06250% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.74%. Comparing base (c598deb) to head (9d2ca9a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cli/src/utils/xlr/bundle.ts 84.37% 19 Missing and 1 partial ⚠️
cli/src/commands/xlr/bundle.ts 97.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   35.88%   40.74%   +4.85%     
==========================================
  Files          27       29       +2     
  Lines        1956     2145     +189     
  Branches      159      199      +40     
==========================================
+ Hits          702      874     +172     
- Misses       1252     1267      +15     
- Partials        2        4       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cehan-Chloe
cehan-Chloe marked this pull request as ready for review September 25, 2026 12:53
@cehan-Chloe
cehan-Chloe requested a review from a team as a code owner September 25, 2026 12:53
@cehan-Chloe
cehan-Chloe merged commit b379611 into main Sep 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants